package com.acegear.horizon.domain.repository.jpa;

import com.acegear.horizon.domain.models.constraint.RecommendType;
import com.acegear.horizon.domain.models.jpa.Recommend;

import org.springframework.data.domain.Pageable;

import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;


/**
 * Created by guoweike on 17/4/10.
 */
public interface RecommendRepository extends PagingAndSortingRepository<Recommend, Long> {
    @Transactional
    void deleteByType(RecommendType recommendType);

    List<Recommend> findByType(RecommendType recommendType,Pageable pageable);
}
